<!-- Copyright and License Information v1
    Albatross Shell Framework
    http://AlbatrossShell.codeplex.com/
    Copyright Rushui Guan 2013-2014.  All rights reserved.
    Distributed under the terms of the Microsoft Public License (Ms-PL). 
    The license is available online http://AlbatrossShell.codeplex.com/license 
-->



<wpfViews:WorkspaceView x:Class="Albatross.SharePoint.Explorer.Views.SiteSettingView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
			 xmlns:wpfViews="clr-namespace:Albatross.WPF.Common.Views;assembly=Albatross.WPF.Common"
			xmlns:wpfTools="clr-namespace:Albatross.WPF.Common.Tools;assembly=Albatross.WPF.Common"
			xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"
             mc:Ignorable="d" 
             d:DesignHeight="400" Width="500">
	<wpfViews:WorkspaceView.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/Albatross.WPF.Common;component/Resources/ControlTemplate.xaml"/>
			</ResourceDictionary.MergedDictionaries>

			<wpfTools:CommandGroup x:Key="SaveCommand">
				<wpfTools:CommandReference Command="{x:Static wpfTools:Util.UpdateBindingSourceCommand}" />
				<wpfTools:CommandReference Command="{Binding SaveCommand, ValidatesOnNotifyDataErrors=False}"/>
			</wpfTools:CommandGroup>
			
			<Style x:Key="Label" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}" >
				<Setter Property="Margin" Value="5 2 5 2"/>
			</Style>

			<Style x:Key="TextBoxStyle" TargetType="TextBox">
				<Setter Property="Margin" Value="5 5 5 30"/>
				<Setter Property="FontSize" Value="14"/>
				<Setter Property="Padding" Value="2 3 2 3"/>
				<Setter Property="Validation.ErrorTemplate" Value="{StaticResource InputErrorTemplate}"/>
			</Style>

			<Style x:Key="CheckBoxStyle" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
				<Setter Property="Margin" Value="5 5 5 2"/>
			</Style>

			<Style x:Key="GroupBoxStyle" TargetType="GroupBox" BasedOn="{StaticResource {x:Type GroupBox}}">
				<Setter Property="Margin" Value="10 2 10 2"/>
				<Setter Property="IsTabStop" Value="False"/>
			</Style>
		</ResourceDictionary>
	</wpfViews:WorkspaceView.Resources>
	<wpfViews:WorkspaceView.RibbonTabItem>
		<Fluent:RibbonTabItem Header="{Binding Title, ValidatesOnNotifyDataErrors=False}" IsTabStop="False">
			<Fluent:RibbonGroupBox>
				<Fluent:Button Header="Save" LargeIcon="/Albatross.SharePoint.Explorer;component/Images/32/export.png" Command="{StaticResource SaveCommand}"/>
				<Fluent:Button Header="Cancel" LargeIcon="/Albatross.SharePoint.Explorer;component/Images/32/exit.png" Command="{Binding CloseCommand, ValidatesOnNotifyDataErrors=False}"/>
			</Fluent:RibbonGroupBox>
		</Fluent:RibbonTabItem>
	</wpfViews:WorkspaceView.RibbonTabItem>
	<StackPanel KeyboardNavigation.TabNavigation="Cycle">
		<i:Interaction.Behaviors>
			<wpfTools:SelectAllTextOnFocusMultiBehavior />
		</i:Interaction.Behaviors>
		<GroupBox Header="Name" Style="{StaticResource GroupBoxStyle}">
			<StackPanel>
				<AdornerDecorator>
					<TextBox x:Name="NameInput" Style="{StaticResource TextBoxStyle}" Text="{Binding Name}" />
				</AdornerDecorator>
			</StackPanel>
		</GroupBox>
		<GroupBox Header="Url" Style="{StaticResource GroupBoxStyle}">
			<StackPanel>
				<AdornerDecorator>
					<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding Url, UpdateSourceTrigger=Default}" />
				</AdornerDecorator>
			</StackPanel>
		</GroupBox>
	</StackPanel>
</wpfViews:WorkspaceView>
